package signGrammar;

import java.awt.Graphics;
import java.awt.Point;

public class CNotShapeExpression implements IShape{

	private final IShape a;
	public CNotShapeExpression(IShape a) {
		this.a = a;
	}
	
	@Override
	public Point getHead() {
		return a.getTail();
	}

	@Override
	public Point getTail() {
		return a.getHead();
	}

	@Override
	public CNotShapeExpression print(Graphics graphics) {
		a.print(graphics);
		return this;
	}

	@Override
	public IShape cloneForHead(Point startPoint) {
		return new CNotShapeExpression( a.cloneForTail(startPoint) );
	}

	@Override
	public IShape cloneForTail(Point endPoint) {
		return new CNotShapeExpression( a.cloneForHead(endPoint) );
	}
}
